#define _CRT_SECURE_NO_WARNINGS


#include<stdio.h>

int main()
{
	int I;
	int j;
	scanf("%d", &I);
	if (I<=100000)
	{
		j = I * 0.1;
	}
	if (100000<I<=200000)
	{
		j = 100000 * 0.1 + (I - 100000)*0.075;
	}
	if (200000<I<=400000)
	{
		j = 100000 * 0.1 + 100000 * 0.075 + (I - 200000)*0.05;
	}
	if (400000<I<=600000)
	{
		j = 100000 * 0.1 + 100000 * 0.075 + 200000 * 0.05 + (I - 400000)*0.03;
	}
	if (600000 < I<=1000000)
	{
		j = 100000 * 0.1 + 100000 * 0.075 + 200000 * 0.05 + 200000 * 0.03 + (I - 600000)*0.015;
	}
	
	else j = 100000 * 0.1 + 100000 * 0.075 + 200000 * 0.05 + 200000 * 0.03 + 400000 * 0.015 + (I - 1000000)*0.001;
	printf("%d", j);
	






	return 0;
}